﻿#include "GenericPlatform/InputManager.h"

void InputManager::Init()
{

    s_KeyboardTypesMap[0x1D] = KeyboardType::KEY_0;
    s_KeyboardTypesMap[0x12] = KeyboardType::KEY_1;
    s_KeyboardTypesMap[0x13] = KeyboardType::KEY_2;
    s_KeyboardTypesMap[0x14] = KeyboardType::KEY_3;
    s_KeyboardTypesMap[0x15] = KeyboardType::KEY_4;
    s_KeyboardTypesMap[0x17] = KeyboardType::KEY_5;
    s_KeyboardTypesMap[0x16] = KeyboardType::KEY_6;
    s_KeyboardTypesMap[0x1A] = KeyboardType::KEY_7;
    s_KeyboardTypesMap[0x1C] = KeyboardType::KEY_8;
    s_KeyboardTypesMap[0x19] = KeyboardType::KEY_9;
    s_KeyboardTypesMap[0x00] = KeyboardType::KEY_A;
    s_KeyboardTypesMap[0x0B] = KeyboardType::KEY_B;
    s_KeyboardTypesMap[0x08] = KeyboardType::KEY_C;
    s_KeyboardTypesMap[0x02] = KeyboardType::KEY_D;
    s_KeyboardTypesMap[0x0E] = KeyboardType::KEY_E;
    s_KeyboardTypesMap[0x03] = KeyboardType::KEY_F;
    s_KeyboardTypesMap[0x05] = KeyboardType::KEY_G;
    s_KeyboardTypesMap[0x04] = KeyboardType::KEY_H;
    s_KeyboardTypesMap[0x22] = KeyboardType::KEY_I;
    s_KeyboardTypesMap[0x26] = KeyboardType::KEY_J;
    s_KeyboardTypesMap[0x28] = KeyboardType::KEY_K;
    s_KeyboardTypesMap[0x25] = KeyboardType::KEY_L;
    s_KeyboardTypesMap[0x2E] = KeyboardType::KEY_M;
    s_KeyboardTypesMap[0x2D] = KeyboardType::KEY_N;
    s_KeyboardTypesMap[0x1F] = KeyboardType::KEY_O;
    s_KeyboardTypesMap[0x23] = KeyboardType::KEY_P;
    s_KeyboardTypesMap[0x0C] = KeyboardType::KEY_Q;
    s_KeyboardTypesMap[0x0F] = KeyboardType::KEY_R;
    s_KeyboardTypesMap[0x01] = KeyboardType::KEY_S;
    s_KeyboardTypesMap[0x11] = KeyboardType::KEY_T;
    s_KeyboardTypesMap[0x20] = KeyboardType::KEY_U;
    s_KeyboardTypesMap[0x09] = KeyboardType::KEY_V;
    s_KeyboardTypesMap[0x0D] = KeyboardType::KEY_W;
    s_KeyboardTypesMap[0x07] = KeyboardType::KEY_X;
    s_KeyboardTypesMap[0x10] = KeyboardType::KEY_Y;
    s_KeyboardTypesMap[0x06] = KeyboardType::KEY_Z;

    s_KeyboardTypesMap[0x27] = KeyboardType::KEY_APOSTROPHE;
    s_KeyboardTypesMap[0x2A] = KeyboardType::KEY_BACKSLASH;
    s_KeyboardTypesMap[0x2B] = KeyboardType::KEY_COMMA;
    s_KeyboardTypesMap[0x18] = KeyboardType::KEY_EQUAL;
    s_KeyboardTypesMap[0x32] = KeyboardType::KEY_GRAVE_ACCENT;
    s_KeyboardTypesMap[0x21] = KeyboardType::KEY_LEFT_BRACKET;
    s_KeyboardTypesMap[0x1B] = KeyboardType::KEY_MINUS;
    s_KeyboardTypesMap[0x2F] = KeyboardType::KEY_PERIOD;
    s_KeyboardTypesMap[0x1E] = KeyboardType::KEY_RIGHT_BRACKET;
    s_KeyboardTypesMap[0x29] = KeyboardType::KEY_SEMICOLON;
    s_KeyboardTypesMap[0x2C] = KeyboardType::KEY_SLASH;
    s_KeyboardTypesMap[0x0A] = KeyboardType::KEY_WORLD_1;

    s_KeyboardTypesMap[0x33] = KeyboardType::KEY_BACKSPACE;
    s_KeyboardTypesMap[0x39] = KeyboardType::KEY_CAPS_LOCK;
    s_KeyboardTypesMap[0x75] = KeyboardType::KEY_DELETE;
    s_KeyboardTypesMap[0x7D] = KeyboardType::KEY_DOWN;
    s_KeyboardTypesMap[0x77] = KeyboardType::KEY_END;
    s_KeyboardTypesMap[0x24] = KeyboardType::KEY_ENTER;
    s_KeyboardTypesMap[0x35] = KeyboardType::KEY_ESCAPE;
    s_KeyboardTypesMap[0x7A] = KeyboardType::KEY_F1;
    s_KeyboardTypesMap[0x78] = KeyboardType::KEY_F2;
    s_KeyboardTypesMap[0x63] = KeyboardType::KEY_F3;
    s_KeyboardTypesMap[0x76] = KeyboardType::KEY_F4;
    s_KeyboardTypesMap[0x60] = KeyboardType::KEY_F5;
    s_KeyboardTypesMap[0x61] = KeyboardType::KEY_F6;
    s_KeyboardTypesMap[0x62] = KeyboardType::KEY_F7;
    s_KeyboardTypesMap[0x64] = KeyboardType::KEY_F8;
    s_KeyboardTypesMap[0x65] = KeyboardType::KEY_F9;
    s_KeyboardTypesMap[0x6D] = KeyboardType::KEY_F10;
    s_KeyboardTypesMap[0x67] = KeyboardType::KEY_F11;
    s_KeyboardTypesMap[0x6F] = KeyboardType::KEY_F12;
    s_KeyboardTypesMap[0x69] = KeyboardType::KEY_F13;
    s_KeyboardTypesMap[0x6B] = KeyboardType::KEY_F14;
    s_KeyboardTypesMap[0x71] = KeyboardType::KEY_F15;
    s_KeyboardTypesMap[0x6A] = KeyboardType::KEY_F16;
    s_KeyboardTypesMap[0x40] = KeyboardType::KEY_F17;
    s_KeyboardTypesMap[0x4F] = KeyboardType::KEY_F18;
    s_KeyboardTypesMap[0x50] = KeyboardType::KEY_F19;
    s_KeyboardTypesMap[0x5A] = KeyboardType::KEY_F20;
    s_KeyboardTypesMap[0x73] = KeyboardType::KEY_HOME;
    s_KeyboardTypesMap[0x72] = KeyboardType::KEY_INSERT;
    s_KeyboardTypesMap[0x7B] = KeyboardType::KEY_LEFT;
    s_KeyboardTypesMap[0x3A] = KeyboardType::KEY_LEFT_ALT;
    s_KeyboardTypesMap[0x3B] = KeyboardType::KEY_LEFT_CONTROL;
    s_KeyboardTypesMap[0x38] = KeyboardType::KEY_LEFT_SHIFT;
    s_KeyboardTypesMap[0x37] = KeyboardType::KEY_LEFT_SUPER;
    s_KeyboardTypesMap[0x6E] = KeyboardType::KEY_MENU;
    s_KeyboardTypesMap[0x47] = KeyboardType::KEY_NUM_LOCK;
    s_KeyboardTypesMap[0x79] = KeyboardType::KEY_PAGE_DOWN;
    s_KeyboardTypesMap[0x74] = KeyboardType::KEY_PAGE_UP;
    s_KeyboardTypesMap[0x7C] = KeyboardType::KEY_RIGHT;
    s_KeyboardTypesMap[0x3D] = KeyboardType::KEY_RIGHT_ALT;
    s_KeyboardTypesMap[0x3E] = KeyboardType::KEY_RIGHT_CONTROL;
    s_KeyboardTypesMap[0x3C] = KeyboardType::KEY_RIGHT_SHIFT;
    s_KeyboardTypesMap[0x36] = KeyboardType::KEY_RIGHT_SUPER;
    s_KeyboardTypesMap[0x31] = KeyboardType::KEY_SPACE;
    s_KeyboardTypesMap[0x30] = KeyboardType::KEY_TAB;
    s_KeyboardTypesMap[0x7E] = KeyboardType::KEY_UP;

    s_KeyboardTypesMap[0x52] = KeyboardType::KEY_KP_0;
    s_KeyboardTypesMap[0x53] = KeyboardType::KEY_KP_1;
    s_KeyboardTypesMap[0x54] = KeyboardType::KEY_KP_2;
    s_KeyboardTypesMap[0x55] = KeyboardType::KEY_KP_3;
    s_KeyboardTypesMap[0x56] = KeyboardType::KEY_KP_4;
    s_KeyboardTypesMap[0x57] = KeyboardType::KEY_KP_5;
    s_KeyboardTypesMap[0x58] = KeyboardType::KEY_KP_6;
    s_KeyboardTypesMap[0x59] = KeyboardType::KEY_KP_7;
    s_KeyboardTypesMap[0x5B] = KeyboardType::KEY_KP_8;
    s_KeyboardTypesMap[0x5C] = KeyboardType::KEY_KP_9;
    s_KeyboardTypesMap[0x45] = KeyboardType::KEY_KP_ADD;
    s_KeyboardTypesMap[0x41] = KeyboardType::KEY_KP_DECIMAL;
    s_KeyboardTypesMap[0x4B] = KeyboardType::KEY_KP_DIVIDE;
    s_KeyboardTypesMap[0x4C] = KeyboardType::KEY_KP_ENTER;
    s_KeyboardTypesMap[0x51] = KeyboardType::KEY_KP_EQUAL;
    s_KeyboardTypesMap[0x43] = KeyboardType::KEY_KP_MULTIPLY;
    s_KeyboardTypesMap[0x4E] = KeyboardType::KEY_KP_SUBTRACT;
}
